package com.lune.job.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lune.job.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Caiyilin
 * @since 2022-03-06
 */
public interface UserMapper extends BaseMapper<User> {

    /**
     * 获取所有用户分页
     * @param page
     * @param user
     * @return
     */
    IPage<User> getAllUserByPage(  Page<User> page,   User user);

    /**
     * 根据用户id查询
     */
    List<User> getUserById(Integer id);


    /**
     * 通过用户查询
     * @param user
     * @return
     */
    List<User> query(  User user);
}
